//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// Portions Copyright (c) MiTAC Corp. All rights reserved.
//
// File:    sermddapi.c
// Programmer:   Visual.Wei
// Date: 2007-4
//
#include <windows.h>
#include <oal_kitl.h>
#include "sermddapi.h"

extern void MDD_Deinit();
extern BOOL MDD_Init();
extern void MDD_Read(PVOID buf,DWORD size);
extern void MDD_Write(PVOID buf,DWORD size);
//--------------------------------------------------------
static BOOL oal_usbser_init(KITL_SERIAL_INFO *pInfo)
{
	MDD_Init();
	return TRUE;
}
static VOID oal_usbser_deinit()
{
	MDD_Deinit();
}
static UINT16 oal_usbser_recv(UINT8 *pData, UINT16 size)
{
	MDD_Read(pData,size);
	return 0;
}
static UINT16 oal_usbser_send(UINT8 *pData, UINT16 size)
{
	MDD_Write(pData,size);
	return 0;
}
static VOID oal_usbser_sendcomplete(UINT16 size)
{
}
static VOID oal_usbser_enable_ints()
{
}
static VOID oal_usbser_disable_ints()
{
}
static VOID oal_usbser_power_off()
{
}
static VOID oal_usbser_power_on()
{
}
static VOID oal_usbser_flow_control(BOOL fOn)
{
}

OAL_KITL_SERIAL_DRIVER g_kitlUsbSerial = { \
	oal_usbser_init,
	oal_usbser_deinit,
	oal_usbser_send,
	oal_usbser_sendcomplete,
	oal_usbser_recv,
	oal_usbser_enable_ints,
	oal_usbser_disable_ints,
	oal_usbser_power_off,
	oal_usbser_power_on,
	oal_usbser_flow_control
	};
